package com.study;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/5/6 12:48 下午
 */
public class TimerTaskApp {

    public static void main(String[] args) {
        Timer timer = new Timer();
        TimerTask timerTask = new TimerTask() {
            @Override
            public void run() {
                System.out.println("timer task run");
            }
        };

        timer.schedule(timerTask, 0, 2000);
    }
}
